package com.yuyou.fn.educational.service;

import com.github.wens.framework.service.ISuperService;
import com.yuyou.fn.educational.entity.AttendClassRecord;
import com.yuyou.fn.educational.entity.ClassLecture;
import com.yuyou.fn.educational.entity.StudentReg;
import com.yuyou.fn.educational.vo.ArrangeClassTimeResultVo;
import com.yuyou.fn.educational.vo.AttendClassRecordUpdateVo;
import com.yuyou.fn.educational.vo.AttendClassRecordVo;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 *
 * ClassLecture 表数据服务层接口
 *
 */
public interface IClassLectureService extends ISuperService<ClassLecture,Long> {

    void createClassLecture(Long classId, Integer lectureAmount);

    void saveArrangeClassTimeResult(Long classId , List<ArrangeClassTimeResultVo> arrangeClassTimeResultList);

    ClassLecture findClassLectureByClassIdLectureNo(Long classId, int lectureNo) ;

    List<ClassLecture>  findClassLectureByClassIdsLectureNo(List<Long> classIds,int lectureNo,int attendanceStatus);

    List<ClassLecture> findClassLectureByClassId(Long classId);

    void saveArrangementTeacher(Long classId, List<Long> teacherIds);

    List<ClassLecture> findClassLectureByTeacherId(Long teacherId, Date start, Date end);

    List<ClassLecture> findClassLectureByClassIdAndDateString(Long classId, String dateString);

    void createAttendanceRecordForStudent(List<StudentReg> studentRegList);

    List<AttendClassRecord> findAttendClassRecordByClassLectureId(Long classLectureId);

    List<AttendClassRecordVo> findAttendClassRecordDetailByClassLectureId(Long classLectureId);

    void updateAttendClassRecord(Long classLectureId, List<AttendClassRecordUpdateVo> recordUpdateList,Integer attendanceRole);

    void updateAttendClassAdvanceStatus( List<AttendClassRecordUpdateVo> attendClassRecordUpdateVoList);

    void createAttendanceRecordForStudent(StudentReg studentReg);

    void deleteAttendanceRecordForStudent(Long classId, Long regId,Integer startLectureNo , Integer endLectureNo);

    ClassLecture findAttendingClassLecture(Long teacherId);

    List<ClassLecture> findClassLectureByTeacherIdClassDate(Long teacherId, Date date);

    List<ClassLecture> findClassLectureByTeacherIdTime(Long teacherId, Date classTime, Integer timeOrientation, int limit);

    void clearTeacher(Long classId);

    void clearClassTime(Long classId);

    List<ClassLecture> findHahAttendanceClassLectureByClassId(Long classId);

    void updateClassLecture(Long classId, Integer lectureAmount);

    void rearrangeTeacherForLecture(Long classLectureId, Long teacherId, boolean updateAfterLecture,String remark);

    void reArrangeTeacherForLectrues(List<ClassLecture> classLectures, Long teacherId,String remark);

    void rearrangeTimeForLecture(Long classLectureId, String date, String time, boolean updateAfterLecture);

    void updateTime(Long classId, String studyingTime);

    void updateTeacher(Long classId, Long teacherId);


    List<ClassLecture> findByClassIdAndTime(List<Long> classIdList, Date startDate, Date endDate,Integer attendanceStatus,String ...columns);

    List<ClassLecture> findClassLectureByClassIds(List<Long> classIds);

    List<ClassLecture> findByIdsOrderByNo(List<Long> classLectureIds);

    void updateTotalAmount(List<Long> classLectureIds );

    List<ClassLecture> findRegClassLectureByRegId(StudentReg studentReg);

    /**
    *@Description:  key :regId
    *@Param:
    *@return: 
    *@Author: lzh
    *@date: 
    */
    Map<Long,List<ClassLecture>> findRegClassLectureByRegs(List<StudentReg> studentRegs);
    
    void deleteAttendanceRecordForStudent(Long regId, List<Long> classLectureIds);

    List<Long> lectureNo2ClassLectureId(Long classId, List<Integer> lectureNos);

    List<Long> lectureNo2ClassLectureId(Long classId, Integer startAmount, Integer endAmount);

    List<ClassLecture> findByClassIds(List<Long> classIds);

    List<ClassLecture> findClassLectureBetweenDate(Date start,Date end,Integer attendanceStatus);

    ClassLecture findLectureByClassIdLectureNo(long classId,Integer lectureNo);
}